All Questions
8 questions
3votes
1answer
215views
Group time intervals together
A while back, I supplied an answer on SO for grouping time intervals together. Say you have an array like this: ...
3votes
3answers
322views
Function to check if a date is correct
I have a method that checks if a date is correct or not, which returns a boolean if it is or not. In the method, I first check the format, then the date by using the function ...
1vote
1answer
78views
Displaying a timetable
The following code displays a Timetable, but the code needs too long finish the whole process. ...
2votes
1answer
69views
Queries for the number of users seen each day
The below code returns an array filled with the number of users last seen for each day for $dayCount number of days that is specified via a parameter into the ...
2votes
0answers
98views
PHP cron job for updating broadcast status
I am currently working on a re-occurring broadcast schedule. The whole idea is to setup a cron/task job that will update the broadcast flag "isLive" in a database table. Are there other options to ...
6votes
2answers
1kviews
Displaying content based on the current time
I'm new to PHP and just wrote a bunch of if statements to display content based on the current time. Is there a better way of writing the following block of code ...
4votes
1answer
1kviews
Optimize MySQL double select inside for-loop
I want to get the number if items with state 4 and 1 from my database for each day between a certain date. Is there a smarter ...
1vote
2answers
340views
Translating month number into month name
Time is very important from times immemorial. Doing great things and making it happen in less time is more important as it can mean less effort. So I really like to know which way is faster and more ...